 import java.util.*;

public class Player
{
    private int strength = 100;
    private int health = 100;
    private int aggressivity=5;
    private static Map<String, Thing> bag = new HashMap<>();
    
    //public void step() {
        //strength -= 10;
    //}
      public void sethealth(int hurt)
    {
        this.health+=hurt;
    }

    public int gethealth(){
        return this.health;
    }
    
    public int getaggressivity(){
        return this.aggressivity;
    }
    
    public void pick(Thing thing) {
        bag.put(thing.getName(), thing);
        System.out.println("捡到了："+"["+thing.getName()+"]");
    }
    public void eat(String name) {
        Thing thing = bag.get(name);
        if(thing != null) {
            int strengthago=strength;
            bag.keySet().removeIf(key -> key.contains(name));
            health +=50;
            aggressivity +=10;
            System.out.println("使用了"+name+"  "+"奇妙的变化出现了,皮卡丘进化成雷丘");
            System.out.println("生命值加50，攻击力加10");
            System.out.println("生命值："+health+"攻击力："+aggressivity);
            
        }
    }
    
    public void checkBag() {
        bag.keySet().stream().forEach(key -> System.out.print(key + " "));
        System.out.println(); 
    }
    
    public boolean isDead() {
        return strength <= 0;
    }
    
}
